package com.greydawn.MementoPattern.gameExp;

/**
 * @Author: zhongwr
 * @Create: 2021/12/19 14:57
 * @Version 1.0
 * @Description: 备忘录类，具体保存状态的类
 */
public class GameMemento {

    /**
     * 生命值
     */
    private int lifeValue;
    /**
     * 魔法值
     */
    private int magicValue;
    /**
     * 攻击值
     */
    private int attackValue;

    public GameMemento(int lifeValue, int magicValue, int attackValue) {
        this.lifeValue = lifeValue;
        this.magicValue = magicValue;
        this.attackValue = attackValue;
    }

    public int getLifeValue() {
        return lifeValue;
    }

    public int getMagicValue() {
        return magicValue;
    }

    public int getAttackValue() {
        return attackValue;
    }

    @Override
    public String toString() {
        return " 角色状态:" +
                "生命值=" + lifeValue +
                "魔法值=" + magicValue +
                "攻击值=" + attackValue;
    }
}
